<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span></span>
<button type="button">单击获取1号信息，双击获取2号信息</button>


<script type="text/javascript">
    let but = document.querySelector("button");
    let t = document.querySelector("span");
    but.addEventListener("click",function () {
        t.innerHTML="年龄："+json.user[0].userage+"\r\n用户id:"+json.user[0].userid+"\r\n用户名："+json.user[0].username;
    })
    but.addEventListener("dblclick",function () {
        t.innerHTML="年龄："+json.user[1].userage+"\r\n用户id:"+json.user[1].userid+"\r\n用户名："+json.user[1].username;
    })

    let json={
        user : [{
            "username" : "张三",
            "userage" : 20,
            "userid" : "3311232659"
        },{
            "username" : "王宝强",
            "userage" : 40,
            "userid" : "3337590272"
        },{
            "username" : "魏忠贤",
            "userage" : 9000,
            "userid" : "3334203894"
        }],
        manager : "origin",
        number : 30
    }

</script>
</body>
</html>